package cn.wx.jove.core.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import cn.wx.common.persistence.base.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import cn.wx.jove.core.service.PlateContentService;
import cn.wx.jove.core.entity.PlateContent;
import cn.wx.common.persistence.web.ResponseData;
import cn.wx.jove.core.entity.qo.PlateContentQ;
/**
 *   @description : PlateContent 控制器
 *   ---------------------------------
 *   @author  
 *   @since 2018-11-30
 */
@RestController
@RequestMapping("/plateContent")
public class PlateContentController extends BaseController {

    @Autowired
    private PlateContentService plateContentService;

    /**
     * @description : 通过条件获取PlateContent
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-30
     */
    @RequestMapping(value = "/query/unique", method = RequestMethod.POST)
    public ResponseData queryUnique(PlateContentQ plateContentQ) throws Exception {
        return success(plateContentService.queryUnique(plateContentQ,PlateContent.class));
    }

    /**
     * @description : 通过条件获取PlateContent分页
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-30
     */
    @RequestMapping(value = "/query/page", method = RequestMethod.POST)
    public ResponseData queryPage(PlateContentQ plateContentQ) throws Exception {
        return success(plateContentService.queryPage(plateContentQ));
    }

	/**
     * @description : 通过条件获取PlateContent
     * ---------------------------------
     * @author : 
     * @since : Create in 2018-11-30
     */
    @RequestMapping(value = "/query/list", method = RequestMethod.POST)
    public ResponseData queryList(PlateContentQ plateContentQ) throws Exception {
        return success(plateContentService.queryList(plateContentQ));
    }
    
    /**
     * @description : 通过id删除PlateContent
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-30
     */
    @RequestMapping(value = "/remove", method = RequestMethod.POST)
    public ResponseData remove(PlateContent plateContent) throws Exception {
        return success(plateContentService.remove(plateContent));
    }

    /**
     * @description : 通过id更新PlateContent
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-30
     */
    @RequestMapping(value = "/modify", method = RequestMethod.POST)
    public ResponseData modify(PlateContent plateContent) throws Exception {
        return success(plateContentService.modify(plateContent));
    }
    
    /**
     * @description : 新增PlateContent
     * ---------------------------------
     * @author :  
     * @since : Create in 2018-11-30
     */
     @RequestMapping(value = "/create", method = RequestMethod.POST)
     public ResponseData create(PlateContent plateContent) throws Exception {
        return success(plateContentService.create(plateContent));
     }
}